package zzu.mxd.answer.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;


//import com.baomidou.mybatisplus.annotations.Version;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 题目表
 * </p>
 *
 * @author mxd
 * @since 2018-11-08
 */
@Data
@Accessors(chain = true)
@TableName("answer_exercises")
public class Exercises implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 题目编号
     */
    @ApiModelProperty(value="题目编号")
    private String id;

    /**
     * 题目类型ID
     */
    @ApiModelProperty(value="题目类型ID")
    @TableField("typeId")
    private Long typeId;

    /**
     * 科目ID
     */
    @ApiModelProperty(value="科目ID")
    @TableField("subjectId")
    private Long subjectId;

    /**
     * 难度：0-10
     */
    @ApiModelProperty(value="难度：0-10")
    private Integer difficulty;

    /**
     * 题目内容
     */
    @ApiModelProperty(value="题目内容")
    private String content;

    /**
     * 题目选项A
     */
    @ApiModelProperty(value="题目选项A")
    @TableField("optionA")
    private String optionA;

    /**
     * 题目选项B
     */
    @ApiModelProperty(value="题目选项B")
    @TableField("optionB")
    private String optionB;

    /**
     * 题目选项C
     */
    @ApiModelProperty(value="题目选项C")
    @TableField("optionC")
    private String optionC;

    /**
     * 题目选项D
     */
    @ApiModelProperty(value="题目选项D")
    @TableField("optionD")
    private String optionD;

    /**
     * 正确答案：A/B/C/D
     */
    @ApiModelProperty(value="正确答案：A/B/C/D")
    @TableField("optionRight")
    private String optionRight;

    /**
     * 分值：0-100
     */
    @ApiModelProperty(value="分值：0-100")
    private Integer score;

    /**
     * 题目解析
     */
    @ApiModelProperty(value="题目解析")
    private String analysis;

    /**
     * 上传时间
     */
    @ApiModelProperty(value="上传时间")
    @TableField("uploadTime")
    //解决redis不适配LocalDateTime问题
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime uploadTime;

    /**
     * 题目来源
     */
    @ApiModelProperty(value="题目来源")
    private String source;

    /**
     * 答题人数
     */
    @ApiModelProperty(value="答题人数")
    private Integer peoples;

    /**
     * 答题正确人数
     */
    @ApiModelProperty(value="答题正确人数")
    @TableField("correctNumber")
    private Integer correctNumber;

    /**
     * 正确率:0.01表示1%
     */
    @ApiModelProperty(value="正确率:0.01表示1%")
    @TableField("correctRate")
    private Float correctRate;

    /**
     * 状态：0 删除 1 正常
     */
    @ApiModelProperty(value="状态：0 删除 1 正常")
    private Integer status;


}
